Feature/refactor update system #54
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Description
This PR refactors the applications update system to improve user experience, security, and maintainability. It introduces a redesigned update settings UI, securely handles external links via IPC, and fixes several bugs related to dialog visibility and change detection. Additionally, it addresses unit test failures by updating mocks to match new interfaces.
Goal
shell.openExternalcalls in the renderer with a secure IPC handler.UpdateService.Key Changes
OpenSettingsUpdatesComponentand introducedUpdateDialogComponentto display release notes with proper formatting.open-externalIPC handler in the main process and exposed it viapreload.ts, ensuring all links open in the default browser securely.setTimeoutandNgZone.runinshowCurrentVersionNotesto force Angular change detection and ensure the dialog opens immediately.GitHubReleaseinterface and updatedelectron.d.tsandUpdateServiceto use strict typing instead ofany.app.spec.tsandopen-settings-updates.spec.tsto include the missinglastCheckedsignal and correctGitHubReleasestructure, resolving genericTypeErrorfailures.Type of Change
Impact Assessment
Database Impact
Backup Impact
Testing
How Has This Been Tested?
Test Steps
Test Configuration
UI Changes
Before
Previous update settings screen (simple buttons, no dialog for notes).
After
New
OpenSettingsUpdatesComponentwith "Check for updates" card, "Current Version" display, and a dedicatedUpdateDialogComponentfor viewing formatted release notes.Checklist
npm run lintand fixed any issuesnpm testand all tests passnpm run test:electronand all tests passnpm run sonar:checkand the analysis passesBreaking Changes
Related Issues
Closes # (Add issue number if applicable)
Additional Context
The unit test failures were caused by a mismatch between the
UpdateServiceimplementation (which uses Signals likelastChecked) and the mock objects used in tests, which were missing these properties. This PR aligns the mocks with the actual service implementation.Reviewer Notes
Please focus on the
preload.tschanges regardingopenExternalto ensure no security regressions were introduced, and verify that theNgZonefix inOpenSettingsUpdatesComponenteffectively solves the dialog visibility issue on all platforms.